package com.shop.mapper;

import com.shop.entity.UserCoupon;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserCouponMapper {
    List<UserCoupon> listUserCoupon(@Param("userId")int userId, @Param("pageNum")int pageNum, @Param("pageSize") int pageSize);
    UserCoupon getUserCouponById(@Param("id") Integer id);
    void addUserCoupon(@Param("userId")Integer userId, @Param("couponId")Integer couponId, @Param("used")Integer used);
    void deleteUserCoupon(@Param("id") Integer id);
    void updateUserCoupon(UserCoupon userCoupon);
    int getTotal(@Param("userId")Integer userId);
}